///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "dictdialog.h"

///////////////////////////////////////////////////////////////////////////

DictDialog::DictDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 630,370 ), wxSize( 630,-1 ) );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_listCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SORT_ASCENDING|wxLC_VRULES );
	bSizer3->Add( m_listCtrl, 1, wxEXPAND|wxALL, 5 );
	
	mainSizer->Add( bSizer3, 1, wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 3, 2, 0, 0 );
	fgSizer1->AddGrowableCol( 1 );
	fgSizer1->AddGrowableCol( 2 );
	fgSizer1->AddGrowableRow( 0 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText2 = new wxStaticText( this, wxID_ANY, _("Primary language:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_textCtrlPrimLang = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_textCtrlPrimLang, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText3 = new wxStaticText( this, wxID_ANY, _("Translation language:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText3->Wrap( -1 );
	fgSizer1->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrlTranLang = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_textCtrlTranLang, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText4 = new wxStaticText( this, wxID_ANY, _("Dictionary name:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText4->Wrap( -1 );
	fgSizer1->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrlDictName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_textCtrlDictName, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
	
	mainSizer->Add( fgSizer1, 0, wxEXPAND|wxALL, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* buttonSizer;
	buttonSizer = new wxBoxSizer( wxHORIZONTAL );
	
	m_buttonOk = new wxButton( this, wxID_OK, _("&Ok"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonOk->SetDefault(); 
	buttonSizer->Add( m_buttonOk, 0, wxALL, 5 );
	
	m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	buttonSizer->Add( m_buttonCancel, 0, wxALL, 5 );
	
	m_buttonDelete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonDelete->Enable( false );
	
	buttonSizer->Add( m_buttonDelete, 0, wxALL, 5 );
	
	m_buttonCreate = new wxButton( this, wxID_ANY, _("Create"), wxDefaultPosition, wxDefaultSize, 0 );
	buttonSizer->Add( m_buttonCreate, 0, wxALL, 5 );
	
	m_buttonOpen = new wxButton( this, wxID_ANY, _("Open"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonOpen->Enable( false );
	
	buttonSizer->Add( m_buttonOpen, 0, wxALL, 5 );
	
	mainSizer->Add( buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ) );
	m_listCtrl->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( DictDialog::OnEnterWindow ), NULL, this );
	m_listCtrl->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_listCtrl->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DictDialog::OnLeftDClick ), NULL, this );
	m_listCtrl->Connect( wxEVT_COMMAND_LIST_DELETE_ITEM, wxListEventHandler( DictDialog::OnDictDeselected ), NULL, this );
	m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DictDialog::OnDictDeselected ), NULL, this );
	m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DictDialog::OnDictSelected ), NULL, this );
	m_textCtrlPrimLang->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_textCtrlTranLang->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_textCtrlDictName->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnOkClick ), NULL, this );
	m_buttonOk->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnCancelClick ), NULL, this );
	m_buttonCancel->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnDeleteClick ), NULL, this );
	m_buttonDelete->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnCreateClick ), NULL, this );
	m_buttonCreate->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonOpen->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnOpenClick ), NULL, this );
	m_buttonOpen->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
}

DictDialog::~DictDialog()
{
	// Disconnect Events
	this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ) );
	m_listCtrl->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( DictDialog::OnEnterWindow ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DictDialog::OnLeftDClick ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_DELETE_ITEM, wxListEventHandler( DictDialog::OnDictDeselected ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DictDialog::OnDictDeselected ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DictDialog::OnDictSelected ), NULL, this );
	m_textCtrlPrimLang->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_textCtrlTranLang->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_textCtrlDictName->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnOkClick ), NULL, this );
	m_buttonOk->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnCancelClick ), NULL, this );
	m_buttonCancel->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnDeleteClick ), NULL, this );
	m_buttonDelete->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonCreate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnCreateClick ), NULL, this );
	m_buttonCreate->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	m_buttonOpen->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DictDialog::OnOpenClick ), NULL, this );
	m_buttonOpen->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DictDialog::OnKeyDown ), NULL, this );
	
}
